package kr.hkit.powerjava.chapter06;

//근로소득세 계산 프로그램
import java.util.Scanner;

public class IfEx2 {
	public static void main(String[] args) {

		int income;
		int tax;
		System.out.print("과세 표준금액을 입력하시오 :");

		Scanner in = new Scanner(System.in);
		income = in.nextInt();

		if (income <= 1000) {
			tax = (int) (0.09 * income);
		} else if (income <= 4000) {
			tax = (int) (1000 * 0.09 + 0.18 * (income - 1000));
		} else if (income < 8000) {
			tax = (int) (1000 * 0.09 + 3000 * 0.18 + 0.27 * (income - 4000));
		} else {
			tax = (int) (1000 * 0.09 + 3000 * 0.18 + 4000 * 0.27 + 0.36 * (income - 8000));
		}
		System.out.println("소득세는 " + tax + "입니다.");
	}
}
